package com.swsc.xapp.utils;

import android.app.ActivityManager;

import java.util.List;

public class AppManager {
    public static void removeAll(android.content.Context mContext) {
        if(null != mContext){
            ActivityManager am = (ActivityManager) mContext.getSystemService(ContextUtils.getCurApplication().ACTIVITY_SERVICE);
            List<ActivityManager.AppTask> appTaskList = am.getAppTasks();
            for (ActivityManager.AppTask at : appTaskList) {
                at.finishAndRemoveTask();
            }
        }
    }
}
